# -*- encoding: utf-8 -*-

from celery_tasks.main import app
from libs.yuntongxun.sms import CCP

import logging
logger = logging.getLogger('django')


@app.task
def celery_send_sms_code(mobile, code):
    try:
        CCP().send_template_sms(mobile, [code, 300], 1)
    except Exception as e:
        logger.error(e)
